import {defineStore} from "pinia";

export const useCount = defineStore('count',{
    actions:{
        interment(value:number){
            //修改数据 this 是当前的store
            if (this.sum <10 ){
                this.sum += value
            }
        }
    },
    state (){
        return {
            sum:6,
            name:'野原新之助',
            address:'日本'
        }
    }
})